﻿Public Class Configuracion

    Private ucConsultar As New ConsultarCuentaContable


    Private Sub Configuracion_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
        Dim ubicacion As New Point(152, 0)


        'Consultar
        ucConsultar.Visible = False
        ucConsultar.Location = ubicacion

        ' Agrega los controles

        Me.Controls.Add(ucConsultar)
    End Sub

    Public Sub mostrarControl(ByVal p_uc As UserControl)
        'Escondemos todas las pantallas de configuración
        For Each uc As Control In Me.Controls
            If TypeOf uc Is UserControl Then
                uc.Visible = False
            End If
        Next

        'Mostramos la que se pidió
        p_uc.Visible = True
    End Sub

    Private Sub TreeView1_AfterSelect(ByVal sender As System.Object, ByVal e As System.Windows.Forms.TreeViewEventArgs) Handles tvConfiguracion.AfterSelect
        Select Case e.Node.Name
            Case "ndRegistrar"
                'mostrarConfig(ucRegistrar)
            Case "ndConsultar"
                mostrarControl(ucConsultar)
        End Select
    End Sub

    'Metodo para asignar
End Class
